package com.meituan.sdk.model.dcpd.queueOrder.orderStatusUpdate;

import com.meituan.sdk.annotations.ApiMeta;
import com.google.gson.reflect.TypeToken;
import javax.validation.constraints.NotBlank;
import java.lang.reflect.Type;
import com.meituan.sdk.internal.utils.JsonUtil;
import com.google.gson.annotations.SerializedName;
import javax.validation.constraints.NotNull;
import com.meituan.sdk.MeituanResponse;
import com.meituan.sdk.MeituanRequest;

/**
* 更新订单状态
* This file was automatically generated.
*/
@ApiMeta(
    path = "/dcpd/queue/order/status/update",
    businessId = 49,
    apiVersion = "10008",
    apiName = "order_status_update",
    needAuth = true
)
public class OrderStatusUpdateRequest implements MeituanRequest<Boolean> {
    /**
    * <p data-diff-id="ct-diff-id-29267706-fb0d-4c9d-8dc4-1faa10fe774c">美团侧订单id</p>
    */
    @NotBlank(message = "orderViewId不能为空")
    @SerializedName("orderViewId")
    private String orderViewId;
    /**
    * <p data-diff-id="ct-diff-id-24f7e63c-ab5a-49af-906d-4b30b3789271">三方订单id</p>
    */
    @NotBlank(message = "orderId不能为空")
    @SerializedName("orderId")
    private String orderId;
    /**
    * <p data-diff-id="ct-diff-id-c29f5211-3b1d-481d-adc4-a403fb0684ea">新的订单状态：<strong><span style="color: rgb(81, 90, 110)">1： 取号中 2： 取号失败 3： 排队中 4： 叫号中 5： 已就餐 6： 已过号 7： 取消中 8： 已取消</span></strong></p>
    */
    @NotNull(message = "status不能为空")
    @SerializedName("status")
    private Integer status;
    /**
    * <p data-diff-id="ct-diff-id-6b8c69bf-c726-42e9-b5b9-30ebfaaf8046">队列位置，<span style="color: rgba(0, 0, 0, 0.65)">从1开始。index=9代表前面还有8桌</span></p>
    */
    @NotNull(message = "index不能为空")
    @SerializedName("index")
    private Integer index;
    /**
    * <p data-diff-id="ct-diff-id-7a2cdcaf-dcc1-4d94-a2cb-9775e506409e">操作时间，单位毫秒</p>
    */
    @NotNull(message = "operateTime不能为空")
    @SerializedName("operateTime")
    private Long operateTime;

    public String getOrderViewId() {
        return orderViewId;
    }
    public void setOrderViewId(String orderViewId) {
        this.orderViewId = orderViewId;
    }
    public String getOrderId() {
        return orderId;
    }
    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }
    public Integer getStatus() {
        return status;
    }
    public void setStatus(Integer status) {
        this.status = status;
    }
    public Integer getIndex() {
        return index;
    }
    public void setIndex(Integer index) {
        this.index = index;
    }
    public Long getOperateTime() {
        return operateTime;
    }
    public void setOperateTime(Long operateTime) {
        this.operateTime = operateTime;
    }


    @Override
    public MeituanResponse<Boolean> deserializeResponse(String response) {
        Type type = new TypeToken<MeituanResponse<Boolean>>(){}.getType();
        return JsonUtil.fromJson(response, type);
    }
    @Override
    public String serializeToJson() {
        return JsonUtil.toJson(this);
    }


    @Override
    public String toString() {
        return "OrderStatusUpdateRequest{" + "orderViewId=" + orderViewId + "," + "orderId=" + orderId + "," + "status=" + status + "," + "index=" + index + "," + "operateTime=" + operateTime + "}";
    }
}
